const request = require('request');

class apiService {
	constructor(){
	}
	request(options) {
		return new Promise((resolve, reject) => {
			request(options, function (error, response, body) {
				if (!error && response.statusCode === 200) {
					resolve(body);
				}else{
					reject({error:response.statusCode});
				}
			});
		});
	}
}
module.exports = apiService;